#ifndef __MODBUS_H__
#define __MODBUS_H__


#include "stm32f0xx_hal.h"

#define MODBUS_RX_BUF_SIZE	200
#define MODBUS_TX_BUF_SIZE	200
#define MODBUS_REG_SIZE		20

#define MB_ADDR_PARAM_NUM       1
#define MB_ADDR_CTRL            2
#define MB_ADDR_PWM_IN          3

extern uint16_t modbusRegister[MODBUS_REG_SIZE];

void modbus_poll(void);
void modbus_rx_callback(uint8_t data);
void modbus_timer_callback(void);

#endif


